package com.rd.student.jiaji.class4.suyan.zrrd.day10;

//import com.zrrd.day08.D;

public class Double {
    public int twoSum(int a,int b){
        return a+b;
    }
    public byte twoSum(byte a,byte b){
        return (byte)(a+b);
    }
    public short twoSum(short a,short b){
        return (short) (a+b);
    }
    public long twoSum(long a,long b){
        return (long)(a+b);
    }
    public double twoSum(double a,double b){
        return (double) (a+b);
    }
    public float twoSum(float a,float b){
        return (float) (a+b);
    }

    public static void main(String[] args) {
        Double d=new Double();
        System.out.println(d.twoSum(1,2));
        System.out.println(d.twoSum((byte)1,(byte) 2));
        System.out.println(d.twoSum((short)2,(short)3));
        System.out.println(d.twoSum((long)3,(long)4));
        System.out.println(d.twoSum((float)1.2, (float)0.6));
        System.out.println(d.twoSum((double) 0.8,(double) 0.7));

    }

}
